package com.ambulance.project.biz.dto;

import com.ambulance.project.biz.entity.Dispatch;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.beans.BeanUtils;

import java.time.LocalDateTime;

/***
 *  @description 质控管理bean
 *  @author zhao
 *  @date: 2020/5/18
 *  @version: v1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="质控管理", description="质控流程管理")
public class DispatchDto {


    @ApiModelProperty(value = "调度状态0接警，1出车，2通话指导，3到达现场，4上车转运，5发起会诊，6溶栓开始7溶栓结束，8到达医院")
    private Integer status;

    @ApiModelProperty(value = "接警时间")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime receiveHelpTime;

    @ApiModelProperty(value = "调度时间")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime dispatchTime;

    @ApiModelProperty(value = "出车时间")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime leaveHospTime;

    @ApiModelProperty(value = "到达时间")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime arriveDestTime;

    @ApiModelProperty(value = "离开时间")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime leaveDestTime;

    @ApiModelProperty(value = "到达患者备注")
    private String arriveDestContent;

    @ApiModelProperty(value = "到达医院时间")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime arriveHostTime;

    @ApiModelProperty(value = "到达医院备注")
    private String arriveHosp;

    @ApiModelProperty(value = "会诊开始")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime treatStart;

    @ApiModelProperty(value = "会诊结合")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime treatEnd;

    @ApiModelProperty(value = "会诊内容")
    private String treatContent;

    @ApiModelProperty(value = "通话指导开始时间")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime guideStart;

    @ApiModelProperty(value = "指导结束时间")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime guideEnd;

    @ApiModelProperty(value = "通话时长s")
    private Integer phoneGuideUseTime;

    @ApiModelProperty(value = "指导内容")
    private String guideContent;

    @ApiModelProperty(value = "用药开始")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime medicineStart;

    @ApiModelProperty(value = "用药结束")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime medicineEnd;


    @ApiModelProperty(value = "目的地")
    private String destination;

    public static DispatchDto copyFromBean(Dispatch dispatch){
        DispatchDto to = new DispatchDto();
        BeanUtils.copyProperties(dispatch,to);
        return to;

    }


}
